//
//  ParentsViewController.m
//  绘制脸
//
//  Created by 胡先剑 on 16/4/6.
//  Copyright © 2016年 胡先剑. All rights reserved.
//

#import "ParentsViewController.h"
#import "FaceViewController.h"

@interface ParentsViewController ()

@property (weak, nonatomic) IBOutlet UILabel *label;
@property (weak, nonatomic) IBOutlet UIButton *button1;
@property (weak, nonatomic) IBOutlet UIButton *button2;
@property (weak, nonatomic) IBOutlet UIButton *button3;

@end

@implementation ParentsViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    if ([self.room isEqualToString:@"father"])
    {
        self.label.text = @"老爸，明天干嘛";
        [self.button1 setTitle:@"我们去太湖玩" forState:UIControlStateNormal];
        [self.button2 setTitle:@"我们到姥姥家去！" forState:UIControlStateNormal];
        [self.button3 setTitle:@"明天我加班，你在家复习功课！" forState:UIControlStateNormal];
    }
    else
    {
        self.label.text = @"老妈，晚上吃什么？";
        [self.button1 setTitle:@"苦瓜炒肉" forState:UIControlStateNormal];
        [self.button2 setTitle:@"回锅肉" forState:UIControlStateNormal];
        [self.button3 setTitle:@"糖醋排骨" forState:UIControlStateNormal];
    }
}

- (IBAction)button1:(UIButton *)sender
{
    self.button = @"button1";
    [self performSegueWithIdentifier:@"face" sender:nil];
}

- (IBAction)button2:(UIButton *)sender
{
    self.button = @"button2";
    [self performSegueWithIdentifier:@"face" sender:nil];
}

- (IBAction)button3:(UIButton *)sender
{
    self.button = @"button3";
    [self performSegueWithIdentifier:@"face" sender:nil];
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    FaceViewController *face = segue.destinationViewController;
    face.room = self.room;
    face.button = self.button;
}

@end
